package router

import (
	"github.com/gogf/gf/frame/g"
	"github.com/gogf/gfer/app/web"
	"github.com/gogf/gfer/app/web/login/github"
)

func init() {
	//g.Server().Group("/", func(group *ghttp.RouterGroup) {
	//	group.Middleware(middleware.View)
	//	group.ALL("/index", new(index.C))
	//	group.ALL("/news", new(news.C))
	//	group.ALL("/blog", new(blog.C))
	//	group.ALL("/user", new(user.C))
	//	group.ALL("/question", new(question.C))
	//})
	s := g.Server()
	s.BindHandler("/", web.Index)
	s.BindObject("/login/github", new(github.C))
	s.BindHandler("/{category}", web.Category)
	s.BindHandler("/{category}/t/:id", web.Question)
	s.BindHandler("/*", web.Index)
}
